using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UwinEducation.Application.Dtos;
using UwinEducation.Shared.Models;

namespace UwinEducation.Application.Common.Interfaces
{
    /// <summary>
    /// 教师假期服务接口
    /// </summary>
    public interface ITeacherVacationService
    {
        /// <summary>
        /// 获取教师假期分页列表
        /// </summary>
        /// <param name="pageRequest">分页请求参数</param>
        Task<PagedResult<TeacherVacationDto>> GetPagedListAsync(TeacherVacationPageRequest pageRequest);

        /// <summary>
        /// 获取教师假期详情
        /// </summary>
        /// <param name="id">假期ID</param>
        Task<TeacherVacationDto> GetByIdAsync(Guid id);

        /// <summary>
        /// 根据教师ID获取所有假期
        /// </summary>
        /// <param name="teacherId">教师ID</param>
        Task<List<TeacherVacationDto>> GetByTeacherIdAsync(Guid teacherId);

        /// <summary>
        /// 根据日期范围获取假期
        /// </summary>
        /// <param name="teacherId">教师ID</param>
        /// <param name="startDate">开始日期</param>
        /// <param name="endDate">结束日期</param>
        Task<List<TeacherVacationDto>> GetByDateRangeAsync(Guid teacherId, DateTime startDate, DateTime endDate);

        /// <summary>
        /// 创建教师假期
        /// </summary>
        /// <param name="createDto">创建参数</param>
        Task<TeacherVacationDto> CreateAsync(CreateTeacherVacationDto createDto);

        /// <summary>
        /// 更新教师假期
        /// </summary>
        /// <param name="updateDto">更新参数</param>
        Task<TeacherVacationDto> UpdateAsync(UpdateTeacherVacationDto updateDto);

        /// <summary>
        /// 删除教师假期
        /// </summary>
        /// <param name="id">假期ID</param>
        Task DeleteAsync(Guid id);
        
        /// <summary>
        /// 检查时间是否有冲突
        /// </summary>
        /// <param name="teacherId">教师ID</param>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="excludeId">排除的假期ID</param>
        Task<bool> HasTimeConflictAsync(Guid teacherId, DateTime startTime, DateTime endTime, Guid? excludeId = null);
    }
} 